<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const str='我在学习前端，希望以后能高新毕业'
    const reg=/前端/
    console.log(reg.test(str))
</script>
</body>
</html>